package concurrency;

public class WeirdThread extends Thread{

	private int x;
	
	public WeirdThread() {
		x = 5;
		start();
	}
	
	@Override
	public void run() {
		x *= 2;
	}
	
	public void doSth() throws Exception{
		join();
		x -= 1;
		System.out.println(x);
	}
	
	public static void main(String[] args) throws Exception {
		new WeirdThread().doSth();
	}
	
}
